﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace RFBR.Core.Infrastructure.Models.Structure
{
	public interface IKnowledgeBase
	{
		string Name { get; set; }

		KnowledgeBaseDataType DataType { get; }

		IEnumerable<IFrame> Frames { get; }

		IEnumerable<IFrame> RootFrames { get; }

		IFrame CreateFrame(string name ="Frame", IFrame parent = null, bool isSubFrame = false);

		IFrame CreateFrame(Guid? parent = null, string name = "Frame", bool isSubFrame = false);

		IFrame SetFrame(Guid id, string name = "Frame", IFrame parent = null, bool isSubFrame = false);

		IFrame GetFrameById(Guid id);

		ICustomObject CreateCustomObject(Guid id, string name = "Custom object", object value = null);

		IVariable CreateVariable(string name = null);

		dynamic ToJSON();
	}
}
